﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class Addmin_Home : System.Web.UI.Page
{
    VendorMethord VM = new VendorMethord();
    protected void Page_Load(object sender, EventArgs e)
    {

        
            if (Session["AdminName"]== null) {
                Response.Redirect("~/LoginManager.aspx");
            }
            if (!IsPostBack)
            {
                Loadinformation();
            }
    }
    public void Loadinformation()
    {
        lblVendorName.Text = Session["AdminName"].ToString();
        DataTable dt = VM.ViewInformation(lblVendorName.Text);
        lblBirthDay.Text = dt.Rows[0][1].ToString().Substring(0, dt.Rows[0][1].ToString().IndexOf(" "));
        lblAddress.Text = dt.Rows[0][2].ToString();
        lblEmailAddress.Text = dt.Rows[0][3].ToString();

    }
}